﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="StudentIndividualAttendanceStatistic.aspx.cs" Inherits="SARS.Tutor.StudentIndividualAttendanceStatistic" %>
<%@ Register TagPrefix="uc" TagName="ProgramCourse" Src="~/UserControl/UcProgramCourse.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h1 id="lblHeading" class="heading1Title">
        <b>
            <asp:Label runat="server" ID="lblName"></asp:Label>
            &nbsp;Attendance Records </b>
    </h1>

    <uc:ProgramCourse ID="ucProgramCourse" runat="server" OnSelectedCourseChanged="ucProgramCourse_OnSelectedCourseChanged"
                      OnSelectedProgramChanged="ucProgramCourse_OnSelectedProgramChanged" IsManual="True" />
    <asp:UpdatePanel ID="ViewAttendancePanel" runat="server">
        <ContentTemplate>
            <asp:Panel ID="Panel1" runat="server" Direction="LeftToRight">
                <table>
                    <tr>
                        <td class="leftLabel">
                            Student Name:
                        </td>
                        <td>
                            <asp:Label runat="server" ID="lbStudentName"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:GridView ID="gvStudentAtt" runat="server" CellPadding="4" ForeColor="#333333"
                                          GridLines="None" Width="754px" AutoGenerateColumns="False" 
                                          DataKeyNames="ID"
                                          EmptyDataText="Student is not assigned into any teaching session">
                                <AlternatingRowStyle BackColor="White" />
                                <Columns>
                                    <asp:BoundField DataField="SessionID" HeaderText="SID">
                                        <HeaderStyle HorizontalAlign="Center" Width="25px" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Session.SessionTopic" HeaderText="Session">
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Session.Manager.FullName" HeaderText="Manage By">
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Session.Room.RoomName" HeaderText="Room">
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Session.StartDate" HeaderText="Date Time">
                                        <HeaderStyle HorizontalAlign="Left" />
                                        <ItemStyle HorizontalAlign="Left" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Is Present">
                                        <ItemTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" onclick="javascript: return false;" 
                                                          Checked='<%# !Convert.ToBoolean(Eval("IsAbsent")) %>'
                                                          TextAlign="Left" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" Width="80"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Center" Width="80"></ItemStyle>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="Select">
                                        <ItemTemplate>
                                            <asp:LinkButton ID="btNotify" runat="server" OnClick="btNotify_OnClick" Text="Notify" 
                                                            Visible='<%# Convert.ToBoolean(Eval("IsAbsent")) %>'></asp:LinkButton>
                                        </ItemTemplate>
                                        <ItemStyle Width="35"></ItemStyle>
                                    </asp:TemplateField>
                                </Columns>
                                <EditRowStyle BackColor="#2461BF" />
                                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                                <RowStyle BackColor="#EFF3FB" />
                                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                                <SortedDescendingHeaderStyle BackColor="#4870BE" />
                            </asp:GridView>
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>